//
//  PeizhiMode.m
//  CarTown
//
//  Created by xionghao on 15/8/4.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "PeizhiMode.h"

@implementation PeizhiMode
-(void)setLongdetail:(NSString *)longdetail{
    _longdetail=longdetail;
    [self setheight];
}
-(void)setheight{
    CGFloat textwith= XHScreenwidth-72;
    NSDictionary *attribute = @{NSFontAttributeName: [UIFont systemFontOfSize:15]};
    
    CGSize labelSize = [_longdetail boundingRectWithSize:CGSizeMake(textwith, 0) options: NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size;
    if (labelSize.height+24>44) {
        self.rowheight=labelSize.height+32;
    }else{
        self.rowheight=44;
    }
    
}
@end
